pp108 : Properties of the Relation Attribute

Properties of the Relation Attribute

This topic describes the properties of the relation attribute in the XML structure of a WS-AppServer model.

A relation attribute represents the relationship between two tables in the database. To create a BusObject, define values for the properties described in the following table.

Property

Description

<name>

Contains the name of the relation.

<type>

Contains the name of the relational class.

occ

Represents the occurrence of the attribute's relations. The acceptable values are:

  • 1 - if the relation is 1:1
  • * - if the relation is 1:n

<match>

Defines the relationship between the tables, based on the primary key and the foreign key.

<attribute type="relation">
    <name>Orders</name>
    <type occ="*">Orders</type>
    <aggregation>false</aggregation>
    <match>
        <local>
            <attribute>CustomerID</attribute>
        </local>
        <remote>
            <attribute>CustomerID</attribute>
        </remote>
    </match>
</attribute>

The attribute element in<match><local>contains the name of the primary key of the current class. The attribute element in<match><remote>contains the foreign key to cross-refer the relational table.

<local><attribute>

Contains the name of the primary key.

<remote><attribute>

Contains the name of the foreign key.


Related tasks

Viewing and Editing the XML Structure of a WS-AppServer Model

Related reference

Properties of the Attribute Element
Properties of the Class Element
Properties of the Method Element
Properties of the Parameter Element
Properties of the Type Element